<script src="/jquery.min.js"></script>
<script src="/layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use(['layer', 'util', 'form'], function () {
        var layer = layui.layer;
        var util = layui.util;
        var form = layui.form;
        //返回顶部
        util.fixbar({bar1: false});
        form.on('submit(*)', function (data) {
            $.ajax({
                type: 'POST',
                url: '/info.php',
                data: data.field,
                dataType: 'json',
                async: false,
                success: function (res) {
                    if (res.code === 200) {
                        let content = "<p>状态：" + res.status + "</p><table class='layui-table'>";
                        $.each(res.data, function (i, val) {
                            content += "<tr><td>" + val.name + "</td><td>" + val.info + "</td></tr>";
                        });
                        content += '</table><p>详细英文注册信息如下</p><pre>' + res.content + '</pre>';
                        $("article").html(content);
                    } else {
                        layer.msg(res.message);
                    }
                },
                error: function () {
                    layer.msg('接口错误');
                }
            })
            return false;
        });
    });
    $(".mobile-icon").click(function () {
        $(".nav").toggleClass('layui-show');
    });
</script>
</body>
</html>
